{% extends "admin_index.html" %}

{% load pagination_tags %}

{% block container %}
<div><a href="/newspaper/admin/save/?next={{ request.path }}" >添加</a></div>
<table style="width:100%;" >
	<thead>
		<tr>
			<th width="5%" >ID</th>
			<th width="65%" >标题</th>
			<th width="10%" >创建日期</th>
			<th width="20%">操作</th>
		</tr>
	</thead>
	<tbody>
	{% autopaginate objs 1 %}
	{% for obj in objs %}
		<tr>
			<td>{{ obj.key.id }}</td>
			<td>{{ obj.title }}</td>
			<td>{{ obj.added|date:"Y-m-d" }}</td>
			<td>
				<div>
					<span><a href="/newspaper/admin/save/{{ obj.key }}?next={{ request.path }}" >修改</a></span>
					<span><a href="/newspaper/admin/delete/{{ obj.key }}?next={{ request.path }}" >删除</a></span>
					<span><a href="/newspaper/admin/comment_list/{{ obj.key }}" >相关评论</a></span>
				</div>
			</td>
		</tr>
	{% endfor %}
	</tbody>
</table>
<div>{% paginate %}</div>
{% endblock %}